@import './color.scss';

.kxui-Popup-vue {
  transition: all .2s !important;

  * {
    font-family: "PingFang SC", "Helvetica Neue", Helvetica, "Hiragino Sans GB", "Microsoft YaHei", 微软雅黑, 黑体, Arial, sans-serif;
    font-size: 14px;
    box-sizing: border-box;
    color: $popupDefaultFont;
  }

  .kxui-Popup-vue-box {
    .kxui-Popup-vue-title {
      transition: all .2s !important;

      >i {
        transition: all .2s !important;
      }
    }

    .kxui-Popup-vue-event {
      transition: all .2s !important;

      >div {
        transition: all .2s !important;
      }
    }
  }
}

.kxui-Popup-vue {
  width: 100%;
  height: 100%;
  position: fixed;
  top: 0;
  left: 0;
  background: $popupDefaultShadow;
  z-index: 0217;
  overflow: hidden;

  .kxui-Popup-vue-box {
    min-width: 260px;
    height: auto;
    border-radius: 3px;
    background: $white;
    overflow: hidden;
    box-shadow: 2px 2px 5px $popupDefaultShadow;
    border: 1px solid $popupDefaultBorder;
    position: absolute;

    .kxui-Popup-vue-title {
      width: 100%;
      height: 40px;
      line-height: 40px;
      padding-left: 20px;
      padding-right: 5px;
      overflow: hidden;
      user-select: none !important;
      border-bottom: 1px solid $popupVueDefaultBorder;
      cursor: move;
      opacity: .6;

      >p {
        width: calc(100% - 40px);
        height: 100%;
        float: left;
        font-weight: bold;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
      }

      >i {
        width: 40px;
        height: 100%;
        display: block;
        float: right;
        text-align: center;
        cursor: pointer;
        font-size: 17px;
      }

      >i:hover {
        color: $popupPrimaryColor;
      }

      >i:active {
        color: $popupPrimaryActive;
      }
    }

    .kxui-Popup-vue-content {
      width: 100%;
      height: auto;
      padding: 20px 20px 10px;
      overflow-x: hidden;
      overflow-y: auto;
      -webkit-overflow-scrolling: touch;
    }

    .kxui-Popup-vue-content-noBtn {
      padding: 20px 20px 40px;
    }

    .kxui-Popup-vue-event {
      width: 100%;
      height: 50px;
      padding: 10px 10px 0;
      text-align: right;
      user-select: none !important;
      overflow: hidden;
      opacity: .6;

      >div {
        min-width: 60px;
        max-width: 150px;
        height: 30px;
        line-height: 30px;
        display: inline-block;
        overflow: hidden;
        margin-left: 10px;
        padding: 0 8px;
        cursor: pointer;
        text-align: center;
        text-overflow: ellipsis;
        white-space: nowrap;
        border-radius: 1px;
        border: 1px solid $popupDefaultBorder;
      }

      >div:hover {
        background: $popupDefaultHover;
      }

      >div:active {
        background: $popupDefaultHover;
        box-shadow: 2px 2px 5px $popupDefaultBorder inset;
      }

      .kxui-Popup-vue-event-primary {
        color: $white;
        border: 1px solid $popupPrimaryBorder;
        background: $popupPrimaryColor;
      }

      .kxui-Popup-vue-event-primary:hover {
        background: $popupPrimaryHover;
      }

      .kxui-Popup-vue-event-primary:active {
        background: $popupPrimaryActive;
        box-shadow: 2px 2px 5px $popupPrimaryActiveShadow inset;
      }

      .kxui-Popup-vue-event-success {
        color: $white;
        border: 1px solid $popupSuccessBorder;
        background: $popupSuccessColor;
      }

      .kxui-Popup-vue-event-success:hover {
        background: $popupSuccessHover;
      }

      .kxui-Popup-vue-event-success:active {
        background: $popupSuccessActive;
        box-shadow: 2px 2px 5px $popupSuccessActiveShadow inset;
      }

      .kxui-Popup-vue-event-info {
        color: $white;
        border: 1px solid $popupInfoBorder;
        background: $popupInfoColor;
      }

      .kxui-Popup-vue-event-info:hover {
        background: $popupInfoHover;
      }

      .kxui-Popup-vue-event-info:active {
        background: $popupInfoActive;
        box-shadow: 2px 2px 5px $popupInfoActiveShadow inset;
      }

      .kxui-Popup-vue-event-warning {
        color: $white;
        border: 1px solid $popupWarningBorder;
        background: $popupWarningColor;
      }

      .kxui-Popup-vue-event-warning:hover {
        background: $popupWarningHover;
      }

      .kxui-Popup-vue-event-warning:active {
        background: $popupWarningActive;
        box-shadow: 2px 2px 5px $popupWarningActiveShadow inset;
      }

      .kxui-Popup-vue-event-danger {
        color: $white;
        border: 1px solid $popupDangerBorder;
        background: $popupDangerColor;
      }

      .kxui-Popup-vue-event-danger:hover {
        background: $popupDangerHover;
      }

      .kxui-Popup-vue-event-danger:active {
        background: $popupDangerActive;
        box-shadow: 2px 2px 5px $popupDangerActiveShadow inset;
      }
    }

    .kxui-Popup-vue-title:hover,
    .kxui-Popup-vue-event:hover {
      opacity: 1;
    }
  }
}

.kxui-Popup-vue-show-enter,
.kxui-Popup-vue-show-leave-to {
  opacity: 0;
  transform: scale(.92);
}

.kxui-Popup-vue-show-enter-to,
.kxui-Popup-vue-show-leave {
  opacity: 1;
  transform: scale(1);
}